<template>
    <view class="set_box">
        <view class="top"></view>
        <view class="user_agreement">
            <text class="">用户使用协议</text>
            <image src="/static/icon/img_icon15.png@2x.png" mode="widthFix"></image>
        </view>
        <view class="privacy_policy">
            <text class="">隐私政策</text>
            <image src="/static/icon/img_icon15.png@2x.png" mode="widthFix"></image>
        </view>
        <view class="version_info">
            <text class="">版本信息</text>
            <text class="">V1.0</text>
        </view>
        <view class="exit_login" @click='logOut'>退出登录</view>
    </view>
</template>

<script>
    export default {
        data(){
            return{
                
            }
        },
        methods:{
            logOut(){
                uni.showModal({
                    title: '提示！！！',
                    content: '真的要退出吗？',
                    success: function (res) {
                        if (res.confirm) {
                            uni.removeStorage({ key: 'headerImg'})
                            uni.removeStorage({
                                key: 'token',
                                success: function (res) {
                                    console.log('退出成功');
                                    uni.switchTab({
                                        url: '/pages/index/index'
                                    });
                                    
                                }
                            });
                        } 
                    }
                });
                
            }
        },
        mounted(){
            
        }
    }
</script>

<style lang="scss" scoped>
    $hign:calc(100vh - 80rpx);

    .set_box {
        box-sizing: border-box;
        width: 750rpx;
        height: $hign;
        background-color: #eeeeee;

        .top {
            width: 750rpx;
            height: 10rpx;
            background-color: #eeeeee;
        }

        .user_agreement,
        .privacy_policy,
        .version_info,
        .exit_login{
            width: 750rpx;
            height: 92rpx;
            background-color: #fff;
            border-bottom: solid 1rpx #eeeeee;
            box-sizing: border-box;
            font-family: PingFangSC-Regular;
            font-size: 32rpx;
            line-height: 32rpx;
            color: #000000;
            border-radius: 10rpx;
            box-sizing: border-box;
            padding: 0 20rpx;
            display: flex;
            justify-content: space-between;
            align-items: center;
            image{
                width: 11rpx;
                height: 21rpx;
            }
        }
        .privacy_policy,
        .version_info{
            margin-bottom:10rpx;
        }
        
    }
</style>
